home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15652 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.cern.ch!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can a function return a array of pointers? a.s.a.p.
  5. Date: 20 Apr 96 22:07:35 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.830038055@news.cern.ch>
  8. References: <4lalvn$536@badger.wmin.ac.uk>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #18 (NOV)
  14.  
  15. In <4lalvn$536@badger.wmin.ac.uk> Idoia Lertxundi <gsoec@wmin.ac.uk> writes:
  16.  
  17. >My question is Can a function return a array of pointers? 
  18.  
  19. No.  It can return the address of the first pointer in an array of pointers,
  20. however.
  21.  
  22. In C, arrays are second class citizens.  They cannot be assigned, passed
  23. as function arguments or returned as function values.  However, all these
  24. actions can be performed if the array is wrapped into a structure.
  25.  
  26. Dan
  27. --
  28. Dan Pop
  29. CERN, CN Division
  30. Email: danpop@mail.cern.ch 
  31. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  32.